package com.weighing.system.service.server;

import com.baomidou.mybatisplus.extension.service.IService;
import com.weighing.system.domain.server.ProduceOrderDetail;

import java.util.List;

/**
 * 工单明细 Service 接口
 */
public interface ProduceOrderDetailService extends IService<ProduceOrderDetail> {

    /**
     * 根据工单号查询明细
     */
    List<ProduceOrderDetail> listByBillNo(String billNo);

    /**
     * 根据子件编号查询明细
     */
    List<ProduceOrderDetail> selectBySubMaterialId(String subMaterialId);

    /**
     * 根据工单号及子件编号查询明细
     */
    ProduceOrderDetail selectBySubMaterialIdAndBillNo(String billNo, String subMaterialId);

    /**
     * 校验子件编号
     * @param billNo 工单编码
     * @param subMaterialId 子件编号
     * @return ProduceOrderDetail
     */
    ProduceOrderDetail checkSubMaterial(String billNo, String subMaterialId);
}
